<!DOCTYPE html>
<html lang="en">
<head>
    <title>一键刷步</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="http://libs.baidu.com/jquery/2.1.4/jquery.min.js"></script>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        .container {
            width: 100%;
            height: 100vh;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            background-color: #000;
        }
        a {
            position: relative;
            width: 100px;
            height: 60px;
            text-align: center;
            line-height: 60px;
            margin: 45px;
            text-decoration: none;
            color: aqua;
            font-size: 20px;
            padding: 0 20px;
            text-transform: uppercase;
            transition: 0.5s;
            overflow: hidden;
            -webkit-box-reflect: below 1px linear-gradient(transparent, #1113);
        }
        a::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 20px;
            height: 20px;
            border-top: 2px solid aqua;
            border-left: 2px solid aqua;
            transition: 0.5s;
            transition-delay: 0.5s;
        }
        a::after {
            content: '';
            position: absolute;
            bottom: 0;
            right: 0;
            width: 20px;
            height: 20px;
            border-bottom: 2px solid aqua;
            border-right: 2px solid aqua;
            transition: 0.5s;
            transition-delay: 0.5s;
        }
        a:hover::before, a:hover::after {
            width: 100%;
            height: 100%;
            transition-delay: 0s;
        }
        a:hover {
            background-color: aqua;
            color: #000;
            box-shadow: 0 0 50px #21ebff;
            transition-delay: 0.3s;
        }
        a:nth-child(1) {
            filter: hue-rotate(150deg);
        }
        a:nth-child(3) {
            filter: hue-rotate(270deg);
        }
        a:nth-child(4) {
            filter: hue-rotate(400deg);
        }
        a:nth-child(5) {
            filter: hue-rotate(70deg);
        }
    </style>
      <style>
        #loading {
          width: 30px;
          height: 30px;
          border: 8px solid #f3f3f3;
          border-top: 8px solid #3498db;
          border-radius: 50%;
          animation: spin 1s linear infinite;
        }
    
        @keyframes spin {
          0% { transform: rotate(0deg); }
          100% { transform: rotate(360deg); }
        }
      </style>
</head>
<body>
    <div class="container">
        <a id="tj">一键刷步</a>
        <!-- 
        <a href="https://www.jq22.com/demo/csshover202007152338/#">一键刷步</a>
        <a href="https://www.jq22.com/demo/csshover202007152338/#">一键刷步</a>
        <a href="https://www.jq22.com/demo/csshover202007152338/#">一键刷步</a>
        <a href="https://www.jq22.com/demo/csshover202007152338/#">一键刷步</a> 
        -->
    </div>
</body>
<script>
    // 获取区间随机数
  	function getRandomInt(min, max) {
	  return Math.floor(Math.random() * (max - min + 1)) + min;
	} 

    $(function() {
	  $("#tj").click(function() {
	    //var counts = ["18522906748@163.com","kuaihuowang5@163.com","zx_yhqs1@163.com","zx_yhqs2@163.com","zx_yhqs3@163.com","zx_yhqs4@163.com"];
		// 用户数据
        $("#loading").show();
		var countsMap = new Map();
			countsMap.set('364282456@qq.com', 'Brave0456');
			countsMap.set('136104839@qq.com', 'Brave0456');
			countsMap.set('594134035@qq.com', 'Brave0456');
			countsMap.set('16622112281@qq.com', 'Szht_5610');
			countsMap.set('17710460312@qq.com', 'Szht_5610');
			// console.info(countsMap)
		
        // var k = 0
		countsMap.forEach((p, u) => {
			// console.log(u, p); 
			// 生成随机步数
			var step = getRandomInt(18000, 19999);
            // alert_tips(step,'success');
            // console.info(countsMap.size)
			$.ajax({
			    type : "POST",
                // async : false,
			    url : 'http://bs.yanwan.store/run4/apimore/cs/2164.php',
			    data : {user:u, password:p, step:step, ver:"cxydzsv3.2"},
			    success : function(data){
                    // var k1 = parseInt(k);
			 	    // alert(data.msg+"， 用户：" + data.user + "，步数：" + data.step);
                    // alert_tips(k1+=parseInt(1) + '户同步完成','success');
                    alert_tips('同步完成','success');
			    }
			 });
		})
        // console.info(countsMap.size)
        // alert_tips(countsMap.size + '户同步完成','success');
	  });
	});
</script>
<script>
/*
* 说明: 弹窗提示,3秒后自动消失
* 调用: alert_tips('操作成功','success');
* */
function alert_tips(str,status) {
    let info_css = 'display: inline-block;position: fixed;z-index: 888;top: 0;right: 30px;text-align: center;padding: 10px 20px;border-radius: 5px;color: #31708f;background-color: #d9edf7;border-color: #bce8f1';
    let danger_css = 'display: inline-block;position: fixed;z-index: 888;top: 0;right: 30px;text-align: center;padding: 10px 20px;border-radius: 5px;color: #a94442;background-color: #f2dede;border-color: #ebccd1;'
    let success_css = 'display: inline-block;position: fixed;top: 0;right: 30px;text-align: center;padding: 10px 20px;border-radius: 5px;color: #3c763d;background-color: #dff0d8;border-color: #d6e9c6;'
    let warning_css = 'display: inline-block;position: fixed;z-index: 888;top: 0;right: 30px;text-align: center;padding: 10px 20px;border-radius: 5px;color: #8a6d3b;background-color: #fcf8e3;border-color: #faebcc;'
    let add_alert = '';
    if(status === 'success'){
        add_alert = '<span id="alert_test" style="'+success_css+'">'+str+'</span>';
    }else if(status === 'info'){
        add_alert = '<span id="alert_test" style="'+info_css+'">'+str+'</span>';
    }else if(status === 'danger'){
        add_alert = '<span id="alert_test" style="'+danger_css+'">'+str+'</span>';
    }else if(status === 'warning'){
        add_alert = '<span id="alert_test" style="'+warning_css+'">'+str+'</span>';
    }
    $('body').append(add_alert);
    //transition: all 3s 2s linear;
    $('span#alert_test').css({"top":"30px","transition":"3s"});
    setTimeout(() => {
        // console.log('sleep 1.8s.');
        let index = 10;
        let interval = setInterval(function () {
            if(index === -60){ //设3秒时间段
                clearInterval(interval);
                $('#alert_test').remove(); //显示完后删除节点
            }
            $('span#alert_test').css({"opacity":(index/10)});
            // console.log('===>',index);
            index--;
        },30)
    }, 2000); //延时2秒
}
</script>
</html>